﻿@inherits BaseForm<TItem>
@typeparam TItem where TItem : class, new()

<AntForm Form="Model">
    @if (Model.Rows != null && Model.Rows.Count > 0)
    {
        foreach (var row in Model.Rows)
        {
            var colSpan = 24 / row.Fields.Count;
            <GridRow>
                @foreach (var field in row.Fields)
                {
                    var label = Language?.GetString<TItem>(field.Column);
                    var required = field.Column.Required;
                    <DataItem Span="colSpan" Label="@label" Required="required" Rules="field.ToRules(Context)">
                        <KField Model="field" />
                    </DataItem>
                }
            </GridRow>
        }
    }
</AntForm>